package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class AlterSequenceGeneratorOptions {

    private int beginIndex;
    private int endIndex;
    private List<AlterSequenceGeneratorOption> alterSequenceGeneratorOptionList;

    public AlterSequenceGeneratorOptions(List<AlterSequenceGeneratorOption> alterSequenceGeneratorOptionList) {
        this.beginIndex = alterSequenceGeneratorOptionList.get(0).getBeginIndex();
        this.endIndex = alterSequenceGeneratorOptionList.get(alterSequenceGeneratorOptionList.size() - 1).getEndIndex();
        this.alterSequenceGeneratorOptionList = alterSequenceGeneratorOptionList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return alterSequenceGeneratorOptionList.size();
    }

    public AlterSequenceGeneratorOption get(int index) {
        return alterSequenceGeneratorOptionList.get(index);
    }

}
